package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * Res entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "RES")
public class Res implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 7857015214576624754L;

    // Fields  
    private Long id;
    private Long resTypeId;
    private Long probeId;
    private String ip;
    private String internalId;
    private String name;
    private String desc;
    private Integer paused;
    private Integer healthStatus;
    private String code;
    private Integer deleted;
    private Integer healthDegree;

    private String administrator;

    // Constructors

    /** default constructor */
    public Res() {
    }

    /** minimal constructor */
    public Res(Long id, Long resTypeId) {
        this.id = id;
        this.resTypeId = resTypeId;
    }

    /** full constructor */
    public Res(Long id, Long resTypeId, Long probeId, String ip, String internalId, String name, String desc, Integer paused, Integer healthStatus, String code, Integer deleted, Integer healthDegree) {
        this.id = id;
        this.resTypeId = resTypeId;
        this.probeId = probeId;
        this.ip = ip;
        this.internalId = internalId;
        this.name = name;
        this.desc = desc;
        this.paused = paused;
        this.healthStatus = healthStatus;
        this.code = code;
        this.deleted = deleted;
        this.healthDegree = healthDegree;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "RES_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "RES_TYPE_ID", nullable = false, precision = 18, scale = 0)
    public Long getResTypeId() {
        return this.resTypeId;
    }

    public void setResTypeId(Long resTypeId) {
        this.resTypeId = resTypeId;
    }

    @Column(name = "PROBE_ID", precision = 18, scale = 0)
    public Long getProbeId() {
        return this.probeId;
    }

    public void setProbeId(Long probeId) {
        this.probeId = probeId;
    }

    @Column(name = "IP", length = 32)
    public String getIp() {
        return this.ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Column(name = "INTERNAL_ID", length = 128)
    public String getInternalId() {
        return this.internalId;
    }

    public void setInternalId(String internalId) {
        this.internalId = internalId;
    }

    @Column(name = "NAME", length = 128)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "DESC_", length = 512)
    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Column(name = "PAUSED", precision = 1, scale = 0)
    public Integer getPaused() {
        return this.paused;
    }

    public void setPaused(Integer paused) {
        this.paused = paused;
    }

    @Column(name = "HEALTH_DEGREE", precision = 9, scale = 0)
    public Integer getHealthDegree() {
        return this.healthDegree;
    }

    @Column(name = "HEALTH_STATUS", precision = 1, scale = 0)
    public Integer getHealthStatus() {
        return this.healthStatus;
    }

    public void setHealthStatus(Integer healthStatus) {
        this.healthStatus = healthStatus;
    }

    @Column(name = "CODE", length = 128)
    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Column(name = "DELETED", precision = 1, scale = 0)
    public Integer getDeleted() {
        return this.deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    @Column(name = "ADMINISTRATOR", precision = 128)
    public String getAdministrator() {
        return administrator;
    }

    public void setAdministrator(String administrator) {
        this.administrator = administrator;
    }

    @Override
    public String toString() {
        return "Res [id=" + id + ", resTypeId=" + resTypeId + ", probeId=" + probeId + ", ip=" + ip + ", internalId=" + internalId + ", name=" + name + ", desc=" + desc + ", paused=" + paused + ", healthStatus=" + healthStatus + ", code=" + code + ", deleted=" + deleted + ", healthDegree=" + healthDegree + ", administrator=" + administrator + "]";
    }

    public void setHealthDegree(Integer healthDegree) {
        this.healthDegree = healthDegree;
    }

}